﻿using System.Windows;
using UC.Login;
using UC.Principal;

namespace UC
{
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            InicializarAInterfacePrincipal();
        }

        private static void InicializarAInterfacePrincipal()
        {
            var cadastroDeUsuarioModel = new CadastroDeUsuarioModel();
            var cadastroDeUsuarioViewModel = new CadastroDeUsuarioViewModel(cadastroDeUsuarioModel);

            var principalViewModel = new PrincipalViewModel(cadastroDeUsuarioViewModel);
            var principalView = new PrincipalView()
                                 {
                                     DataContext = principalViewModel
                                 };
            principalView.Show();
        }
    }
}
